home *** CD-ROM | disk | FTP | other *** search
- on BigPurge
- if the freeBlock < 3000 then
- unLoadCast()
- else
- end if
- end
-
- on JukeBox maliste, le_act
- global gListZic0, gListZic1, gIndZic1, gIndZic0, gVolZic
- if soundBusy(1) = 0 then
- if le_act = " " then
- if maliste = 0 then
- set maZic to getAt(gListZic0, gIndZic0)
- set gIndZic0 to gIndZic0 + 1
- if gIndZic0 > count(gListZic0) then
- set gIndZic0 to 1
- end if
- else
- set maZic to getAt(gListZic1, gIndZic1)
- set gIndZic1 to gIndZic1 + 1
- if gIndZic1 > count(gListZic1) then
- set gIndZic1 to 1
- end if
- end if
- else
- set maZic to le_act
- end if
- preLoadCast(maZic)
- puppetSound(maZic)
- set the volume of sound 1 to gVolZic
- end if
- end
-
- on keyDown
- global gVolZic, gVolVid, gScopeDe, gScopeHi, gScopeCi, gChapAct, gEtudAct, gScopeEnB, gListDepth, gScopeCh
- if the keyCode = 116 then
- if gVolZic < 245 then
- set gVolZic to gVolZic + 10
- set the volume of sound 1 to gVolZic
- end if
- else
- if the keyCode = 121 then
- if gVolZic > 10 then
- set gVolZic to gVolZic - 10
- set the volume of sound 1 to gVolZic
- end if
- else
- if (the keyCode = 115) or (the keyCode = 119) then
- set monScope to 0
- if gChapAct = "CI" then
- set monScope to gScopeCi
- else
- if (gChapAct = "DE") and (gEtudAct = "lec") then
- set monScope to gScopeDe
- else
- if (gChapAct = "SU") and (gEtudAct = "hi") then
- set monScope to gScopeHi
- else
- if (gChapAct = "SU") and (gEtudAct = "en") then
- set monScope to gScopeEnB
- else
- if gChapAct = "CH" then
- set monScope to gScopeCh
- else
- set monScope to 0
- end if
- end if
- end if
- end if
- end if
- if monScope <> 0 then
- if the keyCode = 115 then
- if gVolVid < 245 then
- set gVolVid to gVolVid + 10
- monScope(VolAbs)
- end if
- else
- if the keyCode = 119 then
- if gVolVid > 10 then
- set gVolVid to gVolVid - 10
- monScope(VolAbs)
- end if
- end if
- end if
- end if
- else
- if (the commandDown = 1) and (the keyCode = 48) then
- set maPos to getPos(gListDepth, the colorDepth)
- if maPos = 3 then
- set maPos to 1
- else
- set maPos to maPos + 1
- end if
- set the colorDepth to getAt(gListDepth, maPos)
- if the colorDepth <> getAt(gListDepth, maPos) then
- set maPos to 1
- set the colorDepth to getAt(gListDepth, maPos)
- end if
- alert(getAt(gTraduit, 113) && getAt(gTraduit, 113 + maPos))
- else
- if (the commandDown = 1) and (the key = "q") then
- beep()
- else
- pass()
- end if
- end if
- end if
- end if
- end if
- end
-
- on mouseDown
- global gNumSpr, gBoutons, gSurvolPrec
- set gNumSpr to 0
- set gSurvolPrec to -1
- end
-
- on mouseUp
- global gBoutons, gSurvolPrec, gEtaSpir, gIndSel, gNumSpr, g1erSprLoc, gOldSelStart, gOldSelEnd
- if gNumSpr = 999 then
- nothing()
- else
- if (gNumSpr > 0) and (gEtaSpir = 0) then
- if the castNum of sprite gNumSpr <> 0 then
- gBoutons(relache, gNumSpr)
- end if
- end if
- set gSurvolPrec to -1
- end if
- curseur(-1)
- end
-
- on SetBoxEnv
- global gNumEnv, gNomBestEnv, gBotBestEnv, gTopBestEnv, gLefBestEnv
- repeat with i = 1 to 4
- spriteBox(29 + i, getAt(gLefBestEnv, getAt(gNumEnv, i)), getAt(gTopBestEnv, getAt(gNumEnv, i)), getAt(gRigBestEnv, getAt(gNumEnv, i)), getAt(gBotBestEnv, getAt(gNumEnv, i)))
- end repeat
- end
-
- on setEnv Le_Code, mode
- global gIndEnv, gEnv1, gEnv2, gEnv3, gEnv4, gCodEnv, gNumEnv, gNomBestEnv, gBotBestEnv, gTopBestEnv, gLefBestEnv, gRigBestEnv, gTextEnvT, gTextEnvL
- curseur(6)
- set monInd to getPos(gIndEnv, Le_Code)
- if monInd = 0 then
- alert("Bug : setEnv, le_code = >" & Le_Code & "<")
- else
- set gCodEnv to list(getAt(gEnv1, monInd), getAt(gEnv2, monInd), getAt(gEnv3, monInd), getAt(gEnv4, monInd))
- set gNumEnv to []
- repeat with i = 1 to 4
- add(gNumEnv, ((monInd - 1) * 4) + i)
- end repeat
- if mode = 1 then
- SetBoxEnv()
- end if
- set gTextEnvL to []
- set i to 1
- set j to 1
- repeat while j < 5
- set codTemp to "@" & getAt(gCodEnv, j)
- if char 2 of codTemp = " " then
- addAt(gTextEnvL, j, " ")
- else
- repeat while (line i of gTextEnvT starts codTemp) <> 1
- set i to i + 1
- end repeat
- set ligne to chars(line i of gTextEnvT, 5, the number of chars in line i of gTextEnvT)
- add(gTextEnvL, ligne)
- set i to i + 1
- if char 1 of line i of gTextEnvT <> "@" then
- setAt(gTextEnvL, j, getAt(gTextEnvL, j) & RETURN & line i of gTextEnvT)
- set i to i + 1
- end if
- end if
- set j to j + 1
- end repeat
- end if
- end
-
- on Affiche_Date le_suj, le_acttxt1, le_acttxt2, le_acttxt3, le_fleche
- global gTraduit, gBarChron
- set monNomSuj to le_suj(Le_Nom)
- set monEpok to le_suj(Le_Epoque)
- if monEpok > 50 then
- set txt2 to getAt(gTraduit, 20)
- else
- if monEpok > 30 then
- set txt2 to getAt(gTraduit, 21)
- else
- if monEpok > 17 then
- set txt2 to getAt(gTraduit, 22)
- else
- if monEpok > 4 then
- set txt2 to getAt(gTraduit, 23)
- else
- if monEpok > 1 then
- set txt2 to getAt(gTraduit, 24)
- else
- set txt2 to getAt(gTraduit, 25)
- end if
- end if
- end if
- end if
- end if
- if monEpok > 1 then
- set txt1 to monEpok && getAt(gTraduit, 17)
- else
- if monEpok = 1 then
- set txt1 to getAt(gTraduit, 18)
- else
- if monEpok = 0.20000000000000001 then
- set txt1 to "200 " & getAt(gTraduit, 19)
- else
- set txt1 to "35 " & getAt(gTraduit, 19)
- end if
- end if
- end if
- set the text of cast le_acttxt1 to txt1
- set the text of cast le_acttxt2 to txt2
- set the textStyle of cast le_acttxt3 to "bold,italic"
- set the text of cast le_acttxt3 to monNomSuj
- gBarChron(fleche, 1, monEpok, le_fleche)
- end
-
- on curseur numCurs
- global gCursor, gCurPrec
- if numCurs <> gCursor then
- if numCurs <> -1 then
- if (gCursor <> 6) and (numCurs <> gCursor) then
- set gCurPrec to gCursor
- set gCursor to numCurs
- cursor([getAt(gListCurs, gCursor), getAt(gListMsk, gCursor)])
- end if
- else
- set gCurPrec to gCursor
- set gCursor to numCurs
- cursor(numCurs)
- end if
- end if
- end
-